package com.example.administrator.myproject.user

import android.content.Intent
import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView

import com.example.administrator.myproject.R
import com.example.administrator.myproject.utils.SPUtils

class UserFragment : Fragment(), View.OnClickListener {
    private var money: TextView? = null
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val view = inflater.inflate(R.layout.my_information_login, container, false)
        money = view.findViewById(R.id.money_tv)
        view.findViewById<View>(R.id.shou).setOnClickListener(this)
        val s2 = SPUtils[activity!!, "money", ""] as String?
        money!!.text = s2
        return view
    }

    override fun onResume() {
        super.onResume()
        val s2 = SPUtils[activity!!, "money", ""] as String?
        money!!.text = s2
    }

    override fun onClick(view: View) {
        val intent = Intent()
        intent.setClass(activity!!, AssessList::class.java)
        activity!!.startActivity(intent)
    }
}
